﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/RestaurantMaster.master" CodeFile="editdish.aspx.cs" Inherits="MasterPages_Default3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Restaurant_ContentPlaceHolder" Runat="Server">
<div style="vertical-align:top; height:100%; overflow:auto;width:100%;">
    <asp:GridView ID="category_gridview" runat="server" CellPadding="4"
       DataKeyNames="Id" ForeColor="#333333" AutoGenerateColumns="False" Width="98%"
       OnRowEditing="RowEditingHandler"  OnRowCancelingEdit="EditCancelingHandler"
       OnRowUpdating="CategoryRowUpdatingHandler" OnRowDeleting="RowDeleteHandler" >
       <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
       <Columns>
           <asp:BoundField DataField="Name" HeaderText="分类名">
               <HeaderStyle HorizontalAlign="Left" />
           </asp:BoundField>
           <asp:BoundField DataField="Description" HeaderText="分类描述">
               <HeaderStyle HorizontalAlign="Left" />
           </asp:BoundField>
           <asp:CommandField ButtonType="Button" ShowEditButton="True" ControlStyle-Width="40px"/>
       </Columns>
       <RowStyle BackColor="#E3EAEB" />
       <EditRowStyle BackColor="#7C6F57" />
       <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
       <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
       <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
       <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
       
    <asp:GridView ID="categorydish_gridview" runat="server" CellPadding="4"
       DataKeyNames="categorydish_id" ForeColor="#333333" AutoGenerateColumns="False" Width="98%"
       OnRowEditing="RowEditingHandler"  OnRowCancelingEdit="EditCancelingHandler"
       OnRowUpdating="CategoryDishRowUpdatingHandler" OnRowDeleting="RowDeleteHandler" >
       <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
       <Columns>
           <asp:BoundField DataField="dish_name" HeaderText="菜 名" ReadOnly="true">
               <HeaderStyle HorizontalAlign="Left" />
           </asp:BoundField>
           <asp:BoundField DataField="categorydish_price" HeaderText="售 价">
               <HeaderStyle HorizontalAlign="Left" />
           </asp:BoundField>
           <asp:CheckBoxField DataField="categorydish_available" HeaderText="是否提供">
               <HeaderStyle HorizontalAlign="Left" />
           </asp:CheckBoxField>
           
           <asp:TemplateField HeaderText="分类">
            <ItemTemplate>
                <asp:Label ID="category_id_label" runat="server" Visible="false" Text='<%#Eval("category_id") %>'></asp:Label>
                <asp:DropDownList ID="category_dropdownlist" runat="server" DataValueField="Id" DataTextField="Name"
                 ></asp:DropDownList>
            </ItemTemplate>
           </asp:TemplateField>
        
           <asp:CommandField ButtonType="Button" ShowEditButton="True" ControlStyle-Width="40px" />
       </Columns>
       <RowStyle BackColor="#E3EAEB" />
       <EditRowStyle BackColor="#7C6F57" />
       <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
       <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
       <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
       <AlternatingRowStyle BackColor="White" />
   </asp:GridView>
</div> 
</asp:Content>

